In this routine, you set a module-level variable, mboolAdding, to a True value. This is used when the data is saved so that you know to invoke an AddNew method on the Recordset object. Next, youll call a routine called FormClear.
The FormClear Procedure
This routine simply clears all the text boxes to a blank value, all the check boxes to an unchecked value, and all the combo boxes to an unselected value. Heres the code:
After the user has entered the new data into the controls, he or she will then need to click the Save command button to save the new data. In this button, you call a routine named FormSave to store the data back into the recordset and then update the database. Heres the code: